package com.roamer.school.repository.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 性别枚举
 *
 * @author roamer
 * @version V1.0
 * @date 2019/1/6 15:48
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum GenderEnum implements IEnum<Integer> {

    /** 未知 */
    UNKNOWN(0, "未知"),
    /** 男 */
    MALE(1, "男"),
    /** 女 */
    FEMALE(2, "女");

    private Integer value;

    private String desc;

    GenderEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

}
